﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Windows.Forms;

namespace PO_Change_Button
{
    class PO_LOGO_Tools_RE : PictureBox
    {
        public PO_LOGO_Tools_RE()
        {
            InitializeComponent();
        }
        private Image beforeImage;
        private Image afterImage;

        public Image ImageNormal
        {
            get { return beforeImage; }
            set { beforeImage = value; }
        }

        public Image ImageChange
        {
            get { return afterImage; }
            set { afterImage = value; }
        }

        private void InitializeComponent()
        {
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            // 
            // Class1
            // 
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Class1_MouseDown);
            this.MouseEnter += new System.EventHandler(this.Class1_MouseEnter);
            this.MouseLeave += new System.EventHandler(this.Class1_MouseLeave);
            this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Class1_MouseUp);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);

        }

        private void Class1_MouseEnter(object sender, EventArgs e)
        {
            this.Width += 5;
            this.Height += 5;
            this.Image = afterImage;
        }

        private void Class1_MouseLeave(object sender, EventArgs e)
        {
            this.Width -= 5;
            this.Height -= 5;
            this.Image = beforeImage;
        }

        private void Class1_MouseUp(object sender, MouseEventArgs e)
        {
            this.Width += 5;
            this.Height += 5;
        }
        private void Class1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                this.Width -= 5;
                this.Height -= 5;
            }
        }

    }
}
